home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 6443 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.2 KB

  1. Path: news.iadfw.net!usenet
  2. From: Larry Weiss <lfw@iadfw.net>
  3. Newsgroups: comp.lang.c
  4. Subject: Re: [Q] Does free() work?
  5. Date: Sat, 24 Feb 1996 15:59:45 -0600
  6. Organization: ---
  7. Message-ID: <312F8A51.26B3@iadfw.net>
  8. References: <4gm3ss$qfa@news.infoserve.net> <Pine.A32.3.91.960223233526.113482D-100000@black.weeg.uiowa.edu> <312F7372.2257@iadfw.net> <Pine.A32.3.91.960224145844.39802C-100000@black.weeg.uiowa.edu>
  9. NNTP-Posting-Host: dal09-01.ppp.iadfw.net
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 2.0 (Win16; I)
  14.  
  15. The Amorphous Mass wrote:
  16.  > > The Amorphous Mass wrote:
  17.  >   Would you agree then that allowing malloc() to be abstracted from
  18.  > actual memory allocation makes it faster on those platforms (like my
  19.  > antiquated Mac) where on-demand memory allocation is slow (or for other
  20.  > reasons), while allowing it to use on-demand memory allocation when
  21.  > that's more appropriate without changing the semantics?  What's important
  22.  > is not that these things are always true in up-to-the-minute hardware, but
  23.  > that they are the rationale behind malloc()'s current implementation.
  24.  >   Question:  I'm thinking of writing a modest C compiler for the Mac,
  25.  > which prefers that memory be allocated and referred to through handles
  26.  > (at least the 68K Macs do).  Would it be conforming to have
  27.  > malloc()/free() allocate through handles, and then transparently add one
  28.  > additional layer of indirection so that the programmer could still think
  29.  > in terms of pointers?  The compiler I have now literally uses pointers,
  30.  > which causes fragmentation.
  31.  >   I suppose this is more comp.std.c, but I'm almost afraid to post there. :)
  32.  > 
  33.  
  34. We discussed this sometime ago in the context of an IBM AIX (RS 6000) system
  35. memory allocation scheme, that even defered actual allocation until the initial 
  36. reference to the area allocated.   I hope the experts here can help
  37. you with your interesting implementation ideas.    There was opinion in all
  38. directions regarding the suitability of AIX's methods as conforming to the
  39. C Standard's specifications.   I'm not sure that I remember a concensus
  40. opinion.    
  41.  
  42. Any implementation ideas for the Standard library should be most suitable 
  43. for news:comp.std.c .
  44.